<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>循环对象</title>
		<script src="vue.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<div id="app">
			<ul>
				<li v-for="item,index in items" :key="index">
					{{index}}{{item.name}},{{item.age}}
				</li>
			</ul>

			<ul>
				<li v-for="val ,key in object" :key="key">
					{{key}}:{{val}}
				</li>
			</ul>
		</div>
		<script type="text/javascript">
			var data = {
				items: [{
						name: "zhangshan",
						age: 18
					},
					{
						name: "zhangshan1",
						age: 20
					},
				],
				object: {
					title: "活着",
					author: "余华",
				}
			}
			var v = new Vue({
				el: "#app",
				data: data,
			})
		</script>
	</body>
</html>
